package com.jobpass.common.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.jobpass.common.insterface.MonthlyMapper;
import com.jobpass.common.model.Monthly;
import com.jobpass.common.service.MonthlyService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author JobPass
 * @since 2020-07-17
 */
@Service
public class MonthlyServiceImpl extends ServiceImpl<MonthlyMapper, Monthly> implements MonthlyService {

    @Resource
    private MonthlyMapper monthlyMapper;
    @Override
    public List<Monthly> FindAllMonthly() {
        return monthlyMapper.selectList(null);
    }

    @Override
    public Monthly FindMonthlyById(Long id) {
        return monthlyMapper.selectById(id);
    }

    @Override
    public int DeleteMonthlyById(Long id) {
        return monthlyMapper.deleteById(id);
    }

    @Override
    public int UpdateMonthlyById(Monthly monthly) {
        return monthlyMapper.updateById(monthly);
    }

    @Override
    public int SavaMonthly(Monthly monthly) {
        return monthlyMapper.insert(monthly);
    }
}
